#include "StdAfx.h"
#include "MsgProc.h"
#include "MyList.h"

LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	MSG_MAP *pMsg = g_MsgMap;

	while (WM_NULL != pMsg->uMsg)
	{
		if (uMsg == pMsg->uMsg)
		{
			return pMsg->pfnMsg(hWnd, wParam, lParam);
		}
		pMsg++;
	}
	
	return DefWindowProc(hWnd, uMsg, wParam, lParam);
}